Displays, such as cathode ray tubes (CRTs), typically have a non-linear response in which the brightness of the display is proportional to an input voltage signal raised to the gamma power, i.e., by a factor proportional to vγ, where γ is the gamma coefficient, and v is the input voltage. The non-linear response of the display, if uncorrected, would result in the displayed brightness for the pixels being different from that which was intended. Consequently, it is desirable to perform a gamma correction of the input to the display to compensate for the non-linearity of the display.
FIG. 1 illustrates a conventional graphics system that includes gamma correction of each pixel output to a display screen. Referring to FIG. 1, a conventional graphics system 100 may include a central processing unit (CPU) 110, system memory 120, graphics processor 130, frame buffer 140, digital to analog converter (DAC) 150, and display 160. A suitable communications bus for communicating data and instructions between CPU 110 and graphics processor 130 may include a bridge 115. (DAC) 150 is used to convert the digital output signal of a frame buffer into an analog signal suitable for a CRT. Gamma correction factors may be stored in a lookup table 155 of the DAC.
One drawback of conventional gamma correction is that the edges of smoothed primitives (e.g., anti-aliased lines, anti-aliased stippled lines, anti-aliased points, and anti-aliased polygons) may appear uneven unless the gamma correction for the whole display is adjusted to optimize the appearance of the edges. However, applying gamma correction to the whole display sufficient to optimize the appearance of the edges of smoothed primitives may result in a gamma correction factor for the entire screen that results in other portions of an image looking washed out.
In common graphics usage, smoothed primitives are primitives whose outer edges have been blended with adjacent colors for a smoother appearance. Jaggies are artifacts of aliasing in which curved lines and diagonal lines appear to have jagged edges due to the discrete pixel locations of the display. Roping is an aliasing effect in which a line appears to change in at least one attribute (e.g., color, brightness, or width) to produce a pattern suggestive of a braided rope.
In an anti-aliasing process, an account must be made of how the primitive overlaps individual pixels of a pixel grid. Changes in the location or orientation of a primitive affects the pixel coverage. For example, if the edge of a primitive moves by a half-pixel, then a fully-covered pixel may become a half-covered pixel and its color would have to change from the color of the primitive to a 50-50 blend of the primitive color and the adjacent background color. Similarly, a nearly vertical edge may fully cover one pixel but cover only 9/10 of the pixel below and only 8/10 of the pixel below that, and so forth until it covers none of the pixel 10 lines below. The change in color must reflect the linear progression of pixel coverage. If the display is non-linear then the edge will appear scalloped as it spans hundreds of pixels. As such an edge changes its orientation, the spacing of the scalloping will change accordingly. (A primitive nearly aligned to the pixel grid will have different jaggies than a similar shaped primitive oriented at a larger angle with respect to the pixel grid). As a result, even smoothed primitives may have brightness non-uniformities across their edges that depend upon the angular orientation of the edges and the non-linearity of the display. These brightness non-uniformities are exacerbated by the gamma of the display and can cause noticeable roping effects, particularly for smoothed primitives that move across a display such that their edges change their angular orientation.
Roping effects in smoothed primitives are annoying in a variety of applications. However, these roping effects are of particular concern in applications in which narrow lines may have an arbitrary angle and/or move across a display surface. For example, a graphics system that has an adequate gamma correction of static textual windows and icons may have noticeable roping effects for graphics applications displaying lines and edges at arbitrary angles. Additionally, in some graphics systems a gamma correction suitable for viewing static windows icons produces unacceptable artifacts when viewing lines.
Therefore, what is desired is an improved apparatus, system, and method for gamma correction of smoothed primitives.